import http from '../../AxiosInstance'
export const getUserGiveLikeApi = (id)=>{
    return http({
        url: '/likes',
        method: 'post',
        data: {
            id
        }
    })
}
export const getUserDetailsInfoApi =()=>{
    return http({
        url: '/users/detail',
        method: 'get',
    })
}
export const userExitApi =()=>{
    return http({
        url: '/users/logout',
        method: 'delete',
    })
}
export const getUserSendQuestionApi = ()=>{
    return http({
        url: '/questions/my',
        method: 'get',
    })
}
export const userAddLikesApi=(id)=>{
    return http({
        url: `/likes/${id}`,
        method: 'post',
    })
}
export const userUpdateAvatarApi=(file)=>{
    return http({
        url: '/file/upload/image',
        method: 'post',
        data:{
            file:file
        },
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

export const userAddFollowApi=(id)=>{
    return http({
        url: `/subscribe/${id}`,
        method: 'post',
    })
}
export const getUserFollowedApi=()=>{
    return http({
        url: '/subscribe/follows',
        method: 'get',
    })
}
export const userDeleteFollowedApi=(id)=>{
    return http({
        url: `/subscribe/${id}`,
        method: 'delete',
    })
}
export const getUserSendQuestionListApi=()=>{
    return http({
        url: '/questions/my',
        method: 'get',
    })
}
export const userReplayCommentApi=(data)=>{
    return http({
        url: '/comments/',
        method: 'post',
        data:{
            content: data.content,
            answerId: data.answerId,
            questionId: data.questionId,
        }
    })
}